/**
 * Created by lemuelwang on 2017/2/22.
 */
qui(function (require, exports, module) {
    Director.Config = $.extend({}, Ancestor.Config, {
            TIME_COLOR_CHANGE: false,
            TABLE_COLMODEL_CONFIG: {
                qipuId: {
                    name: "programQipuId",
                    index: 'programQipuId',
                    title: false,
                    width: 120,
                    sortable: false,
                    align: "center",
                    formatter: function (v, o, r) {
                        return Director.Util.formatter.qipuId(v, o, r);
                    }
                },
                pname: {
                    name: "programName",
                    index: 'programName',
                    title: false,
                    width: 120,
                    sortable: false,
                    align: "center",
                    formatter: function (v, o, r) {
                        return Director.Util.formatter.programName(v, o, r);
                    }
                },
                programStatus: {
                    index: 'programStatus',
                    title: false,
                    width: 80,
                    sortable: false,
                    align: "center",
                    formatter: function (v, o, r) {
                        return Director.Util.formatter.programStatus(v, o, r);
                    }
                },
                playStatus: {
                    name: "playStatus",
                    index: 'playStatus',
                    title: false,
                    width: 80,
                    sortable: false,
                    align: "center",
                    formatter: function (v, o, r) {
                        return Director.Util.formatter.playStatus(v, o, r);
                    }
                },
                startPlayTime: {
                    name: "startPlayTime",
                    index: 'startPlayTime',
                    title: false,
                    width: 150,
                    sortable: false,
                    align: "center"
                },
                stopPlayTime: {
                    name: "stopPlayTime",
                    index: 'stopPlayTime',
                    title: false,
                    width: 150,
                    sortable: false,
                    align: "center"
                },
                operator_list: {
                    title: false,
                    width: 220,
                    sortable: false,
                    align: "center",
                    formatter: function (v, o, r) {
                        return Director.Util.formatter.operator_list(v, o, r);
                    }
                },
                log_id: {
                    name: 'id',
                    index: 'id',
                    title: false,
                    sortable: false,
                    hidden: true
                },
                log_addTime: {
                    name: 'addTime',
                    index: 'addTime',
                    sortable: false,
                    title: false,
                    width: 150,
                    align: 'center'
                },
                log_user: {
                    name: 'user',
                    index: 'user',
                    sortable: false,
                    title: false,
                    width: 150
                },
                log_type: {
                    name: 'type',
                    index: 'type',
                    sortable: false,
                    title: false,
                    width: 120,
                    formatter: function (v, o, r) {
                        return Director.Util.formatter.log_type(v, o, r);
                    }
                },
                log_descr: {
                    name: "descr",
                    index: 'descr',
                    title: false,
                    width: 450,
                    sortable: false
                }
            },
            TABLE_LIST: {
                url: Director.urlConfig.listUrl,
                loadBeforeSend: function (xhr, settings) {
                    xhr.setRequestHeader("Sign", "#f93Uc31K24()_@");
                    return true;
                },
                rowNum: 40,
                prmNames: {
                    page: "pageNo",
                    rows: "pageSize"
                },
                multiselect: false,
                datatype: "local",
                loadtext: '加载中...',
                loadui: "block",
                mtype: "post",
                caption: "导播列表列表",
                pager: "#pager",
                colNames: ["奇谱ID", "节目名称", "节目播放状态", "开始时间", "结束时间", "导播状态", "操作" ],
                colModel: ['qipuId', 'pname', 'programStatus' , 'startPlayTime', 'stopPlayTime', "playStatus", "operator_list"]
            },
            TABLE_LOG: {
                url: Director.urlConfig.directorLogUrl,
                loadBeforeSend: function (xhr, settings) {
                    var auth = Ancestor.Util.getAuth("/director/log/list");
                    xhr.setRequestHeader('Sign', auth.sign);
                    xhr.setRequestHeader("Time", auth.clientTime);
                    xhr.setRequestHeader("From", auth.from);
                    return true;
                },
                multiselect: false,
                loadtext: '加载中...',
                loadui: 'block',
                rowNum: 50,
                mtype: "post",
                datatype: "local",
                prmNames: {
                    page: "pageNo",
                    rows: "pageSize"
                },
                colNames: ["ID", "操作时间", "人员", "动作", "备注"],
                colModel: ['log_id', "log_addTime", "log_user" , "log_type" , "log_descr"],
                pager: "#log_pager"
            },
            PageBeanResource: null,
            PageBeanBackup: null,
            ImgLogo: null,
            ImgLogoMainResource: null,
            AUTH_LOG_DETAIL: false,
            DURING_CHANGE_SETTINGS: false,
            WAITING_MSG: false,
            HINT_MSG: {
                "-2001": "不能删除默认灾备",
                "-2002": "正在使用当前信号源,不能删除"
            },
            REG_VALIDATE:{
                HTTP_RTMP_UDP:/^(http|rtmp|udp):\/\//,
                RTMP_ONLY:/^rtmp:\/\//
            },

            PageBeanEffectImage: null,
            PageBeanEffectSubtitle: null,
            PageBeanEffectAnimation: null,
            PageBeanEffectAudio: null,
            PageBeanEffectCover: null,
            EffectUploadCommonParams: {
                //auth_token: Com.cookie.get('P00001'),
                auth_token: "5aX4BXG5ZM5c8DEwwm1UefCprtQaAwzuwaA0tNAUZFNp6WJDANvSZGq2bd0WZnm1m2m1KA9f",
                qichuan_bizid: "ppc_daobotai",
                file_type: "jpg",
                business_type: "image",
                file_size: "1"
            },
            EFFECT_UPLOAD_URL: auth.dev() ? "http://10.110.22.78/common_upload" : "http://paopaoupload.iqiyi.com/common_upload",
            EFFECT_LIST: [],
            EFFECT_TYPE: {
                image: 1,
                subtitle: 2,
                animation: 3,
                audio: 4,
            },
            EFFECT_CTRL_KEYDOWN: false,
            EFFECT_BACNEND_URL_PREFIX: auth.dev() ? "http://YW-A2980-D.iqiyi.pps:8001/" : "http://10.10.5.155:8002/",
            EFFECT_DEFAULTS: {
                image: {
                    location: '0,0',
                    extraInfo: '{"animation":0,"enterDuration":1,"stayDuration":1,"exitDuration":1,"loop":0,"interval":0,"playTimes":1,"size":"{\\\"w\\\":100,\\\"h\\\":100}"}'
                }
            }
        }
    )
});
